<template>
	<view class="main">
		<u-navbar
		          title="医院概况"
		          :autoBack="true"
		      >
		      </u-navbar>
		<view class="big">
			<u-parse :content="info.plat_hospital_name">{{info.plat_hospital_name  || '暂无'}}</u-parse>
		</view>
		<!-- <view class="time">
			2022-10-16
		</view> -->
		<view class="second_title"  style="margin-top: 40rpx;">
			别名/曾用名：
		</view>
		<view class="details">
			<!-- <u-button type="success">{{info.alias?info.alias:"暂无"}}</u-button> -->
		{{info.alias?info.alias:"暂无"}}
			<!-- <u-parse  :content="info.alias">{{info.alias || '暂无'}}</u-parse> -->
		</view>
		<view class="second_title">
			国家重点科室展示：
		</view>
		<view class="details" v-if="info.country_dept.length>0" style="display: flex;flex-wrap: wrap;">
			<view style="padding: 10rpx;border-radius: 10rpx;border: 1rpx solid #ccc; margin: 10rpx;"  v-for="item in info.province_dept">{{item.dept_name?item.dept_name:"暂无"}}</view>
		</view>
		<view class="details" v-if="!info.country_dept">
			暂无
		</view>
		<view class="second_title">
			省级重点科室展示：
		</view>
		<view class="details" v-if="info.province_dept.length>0" style="display: flex;flex-wrap: wrap;">
			<view style="padding: 10rpx;border-radius: 10rpx;border: 1rpx solid #ccc; margin: 10rpx;"  v-for="item in info.province_dept">{{item.dept_name?item.dept_name:"暂无"}}</view>
		</view>
		<view class="details" v-if="!info.province_dept">
			暂无
		</view>
		<view class="second_title">
			医院概况：
		</view>
		<view class="details">
			<u-parse :content="info.detail">{{info.detail  || '暂无'}}</u-parse>
			<!-- {{info.detail}} -->
		</view>
		<view class="second_title">
			公交路线：
		</view>
		<view class="details">
			<!-- <u-parse  :content="busAdd">{{busAdd  || '暂无'}}</u-parse> -->
			{{busAdd?busAdd:"暂无"}}
		</view>
		<view class="bus">
			{{info.busline?info.busline:"暂无"}}
		</view>
		<view class="second_title">
			医疗服务：
		</view>
		<view class="details">
			暂无
		</view>
	</view>
</template>

<script>
	import {getHospitalOverview} from '@/api/home/search.js'
	export default {
		data() {
			return {
				info:[],
				keypoint:''
			};
		},
		methods:{
			async getData(){
				let id = this.$store.state.doc.currentHosp.hospitalId
				//console.log(id,'[[[[[[[[]]]]]]]]');
				let res = await getHospitalOverview(id)
				this.info = res.data
				this.keypoint = [...res.data.country_dept,...res.data.province_dept,...res.data.city_dept].join(' ')
			}
		},
		computed:{
			busAdd(){
				return this.$store.state.doc.busAddress
			}
		},
		onShow() {
			//console.log(this.$store.state.doc.currentHosp.hospitalId,123)
			// my.setNavigationBar({
			// 	title: '医院概况',
			// 	//frontColor: 'black',
			// 	//backgroundColor: '#F5F6F8',
			// })
		},
		mounted() {
			//console.log(this.$store.state.doc.busAddress,'ssdfsdf');
			this.getData()
		}
	}
</script>

<style lang="scss" scoped>
	.main {
		padding: 30rpx;
		padding-top: 200rpx;

		.big {
			font-size: 32rpx;
			font-weight: 400;
			color: #3D3D3D;
			line-height: 36rpx;
			font-weight: 700;
			margin-bottom: 10rpx;
		}

		.time {
			font-size: 24rpx;
			font-weight: 400;
			color: #999999;
			line-height: 34rpx;
			margin-bottom: 26rpx;
		}

		.second_title {
			color: #3D3D3D;
			font-size: 28rpx;
			line-height: 36rpx;
			font-weight: 700;
			margin-bottom: 26rpx;
		}

		.details {
			color: #3D3D3D;
			font-size: 26rpx !important;
			line-height: 40rpx;
			margin-bottom: 26rpx;
			text-align: justify;
		}

		.bus {
			color: #3D3D3D;
			font-size: 26rpx;
			line-height: 40rpx;
			margin-bottom: 26rpx;
			padding-left: 80rpx;
			padding-right: 10rpx;
			text-align: justify;
		}
	}
</style>